<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>主界面</title>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/easyui/1.3.4/themes/default/easyui.css" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/css/wu.css" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/css/icon.css" />
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/easyui/easyui/1.3.4/themes/icon.css"/>
	<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/js/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/easyui/1.3.4/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/easyui/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript">
		//单击一行弹出下面的节点
		$(function () {
		    $('.easyui-tree').tree({
		        onSelect: function (node) {
		            if (node.state == "closed")
		                $(this).tree('expand', node.target);
		            else
		                $(this).tree('collapse', node.target);
		        }
		    });
		});
		function openPage(str,url){
			if($('#tt').tabs('exists',str)){
				$('#tt').tabs("close",str);
				$('#tt').tabs("add",{
					title:str,	
					content:'<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:100%;"></iframe>',
					closable:true,
					selected:true,
				});
			}else{	
				$('#tt').tabs("add",{
					title:str,	
					content:'<iframe scrolling="auto" frameborder="0"  src="'+url+'" style="width:100%;height:100%;"></iframe>',
					closable:true,
					selected:true,
				});
			}
		}
		function tabsClose(){  
			var tab=$('#tt').tabs('getSelected');//获取当前选中tabs  
		    var index = $('#tt').tabs('getTabIndex',tab);//获取当前选中tabs的index  
		    $('#tt').tabs('close',index);//关闭对应index的tabs  
		}
	</script>
</head>
<body>
	<div id="cc" class="easyui-layout" data-options="fit:true" >   
		<div data-options="region:'north'" style="height:70px;overflow-y:visible;overflow-x:visible;background:url('${pageContext.request.contextPath}/bootstrap/css/images/pattern.jpg');background-width:100%;">
	  		<div class="header">
		  		<span style="position:absolute;left:5px; bottom:1px;font-size: 24px;color:#00AEAE;">
		  			<p>速  递  医  运</p>
	  			</span>
				<div class="header-right" onload="startTime()">
					<span style="position:absolute;right:20px; bottom:1px;font-size: 14px;color:white;">
					    <p><a href="javascript:void(0);" style="color:#00AEAE;"onclick="openPage('我的信息','${pageContext.request.contextPath}/Main/MyInformation.action')">${sessionScope.get('username')}</a>，欢迎您！</p>
	            		<p><a href="javascript:void(0);" style="color:#00AEAE;" onclick="Open_Dialog();">帮助中心</a>  |  <a href="javascript:void(0);" style="color:#00AEAE;" onclick="openPage('修改密码','${pageContext.request.contextPath}/Main/changePas.action}')">修改密码</a>  |  <a href="javascript:void(0);" onclick="LogOut()" style="color:#00AEAE;">安全退出</a></p>
					</span>
				</div>
			</div>
		</div>
  	
		<!-- 左边的菜单项 -->
    	<div class="wu-sidebar" data-options="region:'west',split:true,border:true,title:'导航菜单'"> 
    	<div class="easyui-accordion" data-options="border:false,fit:true"> 
        	<div title="病房信息管理" data-options="iconCls:'icon-application-cascade'" style="padding:5px;">  	
    			<ul class="easyui-tree wu-side-tree">
                	<li iconCls="icon-chart-organisation"><a href="javascript:void(0)" onclick="openPage('病房信息上传','${pageContext.request.contextPath}/doctor/doctorinfo.action')" data-icon="icon-chart-organisation" iframe="0">病房信息上传</a></li>
                    <li iconCls="icon-users"><a href="javascript:void(0)" data-icon="icon-users" data-link="temp/layout-3.html" iframe="0">病房管理</a></li>
                </ul>
            </div>
            <div title="套餐管理" data-options="iconCls:'icon-application-form-edit'" style="padding:5px;">  	
    			<ul class="easyui-tree wu-side-tree">
                	<li iconCls="icon-chart-organisation"><a href="javascript:void(0)" data-icon="icon-chart-organisation" data-link="layout-3.html" iframe="0">定制套餐</a></li>
                    <li iconCls="icon-users"><a href="javascript:void(0)" data-icon="icon-users" data-link="temp/layout-3.html" iframe="0">套餐管理</a></li>
                </ul>
            </div>
            <div title="单价管理" data-options="iconCls:'icon-creditcards'" style="padding:5px;">  	
    			<ul class="easyui-tree wu-side-tree">
                	<li iconCls="icon-chart-organisation"><a href="javascript:void(0)" data-icon="icon-chart-organisation" data-link="layout-3.html" iframe="0">单价设置</a></li>
                    <li iconCls="icon-users"><a href="javascript:void(0)" data-icon="icon-users" data-link="temp/layout-3.html" iframe="0">单价管理</a></li>
                </ul>
            </div>
            <div title="业务管理" data-options="iconCls:'icon-bricks'" style="padding:5px;">  	
    			<ul class="easyui-tree wu-side-tree">
                	<li iconCls="icon-chart-organisation"><a href="javascript:void(0)" data-icon="icon-chart-organisation" data-link="layout-3.html" iframe="0">我的订单</a></li>
                	<li iconCls="icon-chart-organisation"><a href="javascript:void(0)" data-icon="icon-chart-organisation" data-link="layout-3.html" iframe="0">预约医生</a></li>
                </ul>
            </div>
             <div title="我的医院" data-options="iconCls:'icon-cart'" style="padding:5px;">  	
    			<ul class="easyui-tree wu-side-tree">
                	<li iconCls="icon-chart-organisation"><a href="javascript:void(0)" onclick="openPage('我的信息','${pageContext.request.contextPath}/Main/MyInformation.action')" data-icon="icon-chart-organisation" data-link="layout-3.html" iframe="0">我的信息</a></li>
                	<li iconCls="icon-chart-organisation"><a href="javascript:void(0)" data-icon="icon-chart-organisation" data-link="layout-3.html" iframe="0">我的金库</a></li>
                </ul>
            </div>
        </div>
    	</div>
    	<!-- 三段式框架的右下中心main部分 -->
		<div data-options="region:'center'" style="padding:1px;background:#eee;">    
	    	<div id="tt" class="easyui-tabs" data-options="fit:true,plain:false "  style="width:400px;height:100px;">
				<div title="首页" style="padding:10px;">
				</div>
			</div>
		</div>
	</div>
	
	<!-- 弹出的帮助中心的dialog -->
	<div id="Help_Dialog" style="display:none;padding:5px;width:700px;height:400px;"><br>
	 	<div style="font-size:23px;" align="center">帮助中心</div>
		 
	</div>
	
	<script type="text/javascript">
		function LogOut(){
			$.messager.confirm("操作提示","您确定要登出吗？",function (data){
				if(data){
					window.location.href="${pageContext.request.contextPath}/Login/logoutsubmit";
				}
			});
		}
		function Open_Dialog(){
			$('#Help_Dialog').show();
			$('#Help_Dialog').dialog({
				collapsible:true,
				minimizable:true,
				maximizable:true,
				buttons:[{
					text:'确定',
					iconCls:'icon-ok',
					handler:function(){
						//$('#Help_Dialog').dialog('close');
					}
				},{
					text:'关闭',
					iconCls:'icon-cancel',
					handler:function(){
						$('#Help_Dialog').dialog('close');
					}
				}]
			});
		}
	</script>
</body>
</html>